﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
    <title>查看样点文件</title>
    
    <link href ="css/word.css"  rel ="stylesheet"  />
    
    <script type ="text/javascript" src ="Javascript/Common.js"></script>
    
<!--    <script type ="text/javascript" src ="JQueryJavascript/jquery-1.2.6.js"></script>
-->    
    <script type ="text/javascript" language ="javascript" >
        function loadSamplePointsTable()
        {
            var SampleParcelsXmlLocation = "data/Parcels.xml";
            var xmlDoc = LoadXML(SampleParcelsXmlLocation);
            var xmlDocument = xmlDoc.documentElement;
            
            var tableTitleNames = new Array("地块编号","纬度","经度","叶面积指数","叶片含水量","比叶重","植株总干重","NDVI","NDWI","NRI");
            var tableTitles = new Array();
            for(var i = 0; i < tableTitleNames.length; i++){
                tableTitles[i] = document.createTextNode(tableTitleNames[i]);
            }
            
            var ParcelsNumber = xmlDocument.childNodes.length;
            var ParcelsVaule = new Array();
            
            for(var i = 0; i < ParcelsNumber; i++)
            {
                ParcelsVaule[i] = new Array();
                
                for (var j = 0; j < tableTitles.length; j++)
                {
                    ParcelsVaule[i][j] = document.createTextNode(xmlDocument.childNodes[i].childNodes[j].nodeValue);
                }
            }
            
            var table = new DataTable(tableTitles,ParcelsVaule,0);
//            $(table).addClass("viewTable");
            
            document.getElementById("view").appendChild(table);
        }
    </script>
</head>
<body onload = "loadSamplePointsTable()">
    <div id = "view" >
    </div>
</body>
</html>
